package acm;


import java.util.Scanner;

public class a10{
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[][] a = new int[n][n];
        a[0][0]=1;
        int m=0;
        for (int x=0;x<n;x++){
            for (int y=0;y<x;y++){
                if (y!=0){
                    a[x][y]=a[x-1][y]+a[x-1][y-1];
                }
            }
            a[x][0]=1;
            a[x][x]=1;
        }
        for (int i=0;i<n;i++){
            m=0;
            for (int j=0;j<=i;j++){
                if (m==0){
                    System.out.print(a[i][j]);
                    m++;
                }
                else {
                    System.out.print(" "+a[i][j]);
                }
            }
            System.out.println();
        }
    }
}
